/*
 * Copyright 2025 The JA-SIG Collaborative. All rights reserved.
 * distributed with this file and available online at
 */
package com.lap.auth.adapter.driving.persistence.dict;

import com.lap.auth.adapter.driving.persistence.dict.po.DictPo;
import com.lap.auth.domain.dict.Dict;
import java.util.List;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(componentModel = "spring")
public interface DictConverter {

  Dict toDomain(DictPo dictPo);

  List<Dict> toDomains(List<DictPo> list);

  @Mapping(target = "tenantCode", ignore = true)
  @Mapping(target = "updatedBy", ignore = true)
  @Mapping(target = "updateTime", ignore = true)
  @Mapping(target = "createdBy", ignore = true)
  @Mapping(target = "createTime", ignore = true)
  DictPo toPo(Dict dict);

  List<DictPo> toPoList(List<Dict> list);
}
